﻿CREATE TABLE [dbo].[ActivityLink]
(
	[Activity1] [uniqueidentifier] NOT NULL, -- FK to Activity
	[Activity2] [uniqueidentifier] NOT NULL, -- FK to Activity
	[Condition] [nvarchar](max) NULL, -- String to parse
	[Comment] [nvarchar](max) NULL,
    [IsDeleted] [bit] DEFAULT 0 NOT NULL,
    [CreatedBy] [uniqueidentifier] NOT NULL, -- FK to Person
	[CreatedOn] [datetime] DEFAULT getdate() NOT NULL,
    [LastChanged] [datetime] DEFAULT getdate() NOT NULL,
	[LastChangedBy] [uniqueidentifier] NOT NULL, -- FK to Person
	[TimeStamp] [timestamp] NOT NULL

CONSTRAINT [PK_ActivityLink] PRIMARY KEY CLUSTERED 
(
	[Activity1] ASC,
	[Activity2] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO